package org.example.controller;

import org.example.model.Sign;
import org.example.utils.KieSessionUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/***
 * @author Administrator
 */
@RestController
public class SysRuleController {

    @RequestMapping(value = "exec")
    public Sign exec(int status, int price) {
        Sign sign = new Sign();
        sign.setCode("913101011322226179");
        sign.setTitle("上海国际招标有限公司");
        sign.setStatus(status);
        sign.setPrice(price);
        sign.setPhone("18721420863");
        sign = (Sign) KieSessionUtils.execRuleFile("hello.drl", sign);
        return sign;
    }
}
